const mongoose = require('mongoose');
const config = require('../config');

const ObjectSchema = new mongoose.Schema(
  {
    openid: {
      type: String,
      index: true,
    },
    nickname: String,
    avatar: String,
    battle_net: String,
  },
  config,
);

exports.User = mongoose.model('User', ObjectSchema, 'user');
